package com.tjsinfo.tjsoa.chuanyue.task;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import org.hibernate.Session;
import org.hibernate.Transaction;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.taskmgmt.def.AssignmentHandler;
import org.jbpm.taskmgmt.exe.Assignable;

import com.tjsinfo.tjsoa.message.TjsMessageIm;
import com.tjsinfo.tjsoa.system.vo.TSystemUser;
/**
 * 基础工作流任务分配类
 * @author Administrator
 *
 */
public class BaseTaskAssignment implements AssignmentHandler{

	/* (non-Javadoc)
	 * @see org.jbpm.taskmgmt.def.AssignmentHandler#assign(org.jbpm.taskmgmt.exe.Assignable, org.jbpm.graph.exe.ExecutionContext)
	 */
	public void assign(Assignable assignable, ExecutionContext executionContext)
			throws Exception {
		// TODO Auto-generated method stub
		String context =	(String) executionContext.getVariable(executionContext.getTask().getDescription().trim());
		assignable.setActorId(context);
		TjsMessageIm messageIm = new TjsMessageIm();
		messageIm.sendMessage(context, "您有一个传阅待办");
	}

}
